<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="utf-8">
   <link rel="stylesheet" href="/css/AdminUser/adminuser.css">
   <!-- 公共 cs 文件 -->
   <%- include('../commont/Link'); %>
      <title>用户列表</title>
</head>

<body>
   <!-- 管理员头像修改弹出层 -->
   <%- include('../commont/adminPic'); %>

   <!-- 公共的部分 -->
   <%- include('../commont/Header', {user: user}); %>
   <div id="mws-wrapper">
      <!-- 左侧导航 -->
      <%- include('../commont/Navigator', {curNav: curNav}); %>
      <div id="mws-container" class="clearfix">
         <!-- 内容区域 -->
         <div class="container">
            <!-- 管理员展示列表 -->
            <div class="mws-panel grid_8">
               <div class="mws-panel-header">
                  <span><i class="icon-table"></i> 管理员用户列表</span>
               </div>
               <div class="mws-panel-body no-padding">
                  <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
                     <div id="DataTables_Table_1_length" class="dataTables_length">
                        <label>展示 <select size="1" name="DataTables_Table_1_length" aria-controls="DataTables_Table_1">
                              <option value="10" selected="selected">6</option>
                              <option value="25">4</option>
                              <option value="50">2</option>
                           </select> 条
                        </label>
                     </div>
                     <div class="dataTables_filter" id="DataTables_Table_1_filter">
                        <form action="/admin/search" method="GET">
                           <label>
                              搜索: <input class="form-control" type="text" aria-controls="DataTables_Table_1" placeholder="用户名" name="kwd">
                           </label>
                           <button class="btn btn-small btn-primary" type="submit">搜索</button>
                        </form>
                     </div>
                     <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1"
                        aria-describedby="DataTables_Table_1_info">
                        <thead>
                           <tr role="row">
                              <th class="sorting_asc" role="columnheader" tabindex="0"
                                 aria-controls="DataTables_Table_1" rowspan="1" colspan="1" aria-sort="ascending"
                                 aria-label="Rendering engine: activate to sort column descending"
                                 style="width: 258px;">序号</th>
                              <th class="sorting" role="columnheader" tabindex="0"
                                 aria-controls="DataTables_Table_1" rowspan="1" colspan="1"
                                 aria-label="Platform(s): activate to sort column ascending"
                                 style="width: 309px;">用户名</th>
                              <th class="sorting" role="columnheader" tabindex="0"
                                 aria-controls="DataTables_Table_1" rowspan="1" colspan="1"
                                 aria-label="Engine version: activate to sort column ascending"
                                 style="width: 225px;">密码</th>
                              <th class="sorting" role="columnheader" tabindex="0"
                                 aria-controls="DataTables_Table_1" rowspan="1" colspan="1"
                                 aria-label="CSS grade: activate to sort column ascending" style="width: 171px;">
                                 操作</th>
                           </tr>
                        </thead>

                        <tbody role="alert" aria-live="polite" aria-relevant="all">
                           <% data.forEach((v, i) => {%>
                              <tr class="<% v.id % 2 === 0 ? 'odd' : 'even' %>" align="center">
                                 <td class="sorting_1"><%= i + 1 %></td>
                                 <td><%= v.uname %></td>
                                 <td><%= v.pwd %></td>
                                 <td>
                                    <button class="btn btn-danger btn-small btn-del" data-uid="<%= v.id %>" title="删除">
                                       <i class="icon-trash"></i>
                                    </button>
                                    <a class="btn btn-small btn-info" href="/admin/update?id=<%= v.id %>&uname=<%= v.uname %>&pwd=<%= v.pwd %>" title="修改">
                                       <i class="icon-pencil-2"></i>
                                    </a>
                                 </td>
                              </tr>
                           <%})%>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
         </div>
         <!-- 中框底部区域 -->
         <%- include('../commont/Footer'); %>
      </div>
   </div>
   <!-- 公共 js 文件 -->
   <%- include('../commont/Script'); %>
   <script src="/js/AdminUser/adminuser.js"></script>
</body>

</html>